package com.cn.service.server.EM.partRegt.Impl;

import com.cn.bean.vo.EM.partRegt.PageInfo;
import com.cn.bean.vo.EM.partRegt.PartSingleRegisterBean;
import com.cn.bean.vo.EM.partRegt.Send_back_sub_tBean;
import com.cn.common.utils.JsonConverter;
import com.cn.mapper.dao.db5.EM.partRegt.PartSingleRegisterDao;
import com.cn.mapper.dao.db5.EM.partRegt.Send_back_sub_tDao;
import com.cn.mapper.dao.db5.EM.partRegt.Send_back_tDao;
import com.cn.mapper.dao.db5.sys.Sys_Sequence_Info_TDAO;
import com.cn.service.server.EM.partRegt.Send_back_tDaoService;
import com.fasterxml.jackson.core.JsonProcessingException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class Send_back_tDaoServiceImpl implements Send_back_tDaoService {

    private final Send_back_sub_tDao send_back_sub_tDao;
    private final Sys_Sequence_Info_TDAO sysSequenceInfoTdao;

    @Autowired(required = false)
    public Send_back_tDaoServiceImpl(Sys_Sequence_Info_TDAO sysSequenceInfoTdao, Send_back_sub_tDao send_back_sub_tDao) {
        this.send_back_sub_tDao = send_back_sub_tDao;
        this.sysSequenceInfoTdao = sysSequenceInfoTdao;

    }

    @Override
    public List<Send_back_sub_tBean> getPartSingleRegister(Send_back_sub_tBean send_back_sub_tBean, PageInfo pageInfo) throws JsonProcessingException {


        String jsonString = JsonConverter.convertToCustomJson(send_back_sub_tBean, null,pageInfo);

        return send_back_sub_tDao.getPartSingleRegister(jsonString);
    }
}
